import { defineStore } from 'pinia'

// 热门话题死数据（模拟真实场景的话题结构）
const MOCK_TRENDING_TOPICS = [
  {
    id: 'topic-1',
    title: '周末去哪玩',
    cover: 'https://picsum.photos/300/200?random=1',
    notesCount: 2450,
    participants: 12000
  },
  {
    id: 'topic-2',
    title: '小众咖啡馆',
    cover: '极客',
    notesCount: 1890,
    participants: 9800
  },
  {
    id: 'topic-3',
    title: '秋日穿搭',
    cover: 'https://picsum.photos/300/200?random=3',
    notesCount: 3420,
    participants: 15600
  },
  {
    id: 'topic-4',
    title: '自制美食',
    cover: 'https://picsum.photos/300/200?random=4',
    notesCount: 2150,
    participants: 11200
  }
]

export const useTopicStore = defineStore('topics', {
  state: () => ({
    trendingTopics: MOCK_TRENDING_TOPICS,
    currentTopic: null,
    isLoading: false
  })
})